package com.itheima.service.db.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.domain.db.SoulQuestion;
import com.itheima.mapper.SoulQuestionMapper;
import com.itheima.service.db.SoulQuestionService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;

@DubboService
public class SoulQuestionServiceImpl implements SoulQuestionService {

    @Autowired
    SoulQuestionMapper soulQuestionMapper;

    /**
     * 查询所有类型集合
     * @return
     */
    @Override
    public List<SoulQuestion> findAll() {
        LambdaQueryWrapper<SoulQuestion> qw = new LambdaQueryWrapper<>();
        List<SoulQuestion> soulQuestions = soulQuestionMapper.selectList(qw);
        return soulQuestions;
    }

    @Override
    public SoulQuestion findById(Integer typeId) {
        return soulQuestionMapper.selectById(typeId);
    }


}
